how to properly edit hosts, hostname and resolf.conf? [migrated]
Posted
by
Firewall
on Server Fault
See other posts from Server Fault
or by Firewall
Published on 2012-04-02T22:16:13Z
Indexed on
2012/04/02
23:32 UTC
Read the original article
Hit count: 248
i,v been searching the internet for a real noop tutorial on the subject but could not found any direct info. on how to edit these files the proper way.
i,v got a debian internet server that i use to host some personal domains and runs squid and rTorrent. the server is up and running with no problems but i am confused about a few things.
lets say that i named my server (foo), my domain is (example.com) and my public IP is 95.211.133.200 now:
should /etc/hostname contains:
tango.example.comor
tango <----- just the server nameshould /etc/hosts contains:
127.0.0.1 localhost.localdomain localhost 95.211.133.200 foo.example.com fooshould /etc/resolf.conf contains (along with the nameservers) both:
domain example.com search example.comor just the first one.
are there any other files that i should edit in order to make things right?
last thing, the command:
domainname returns: (none)i believe it should return (example.com). what should i do to correct that?
© Server Fault or respective owner